<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <script>
        var str = "2019/09/17 03:27:10";
        /* 2019-09-17 03/27/10 */
        // console.log(new Date(str).getTime())
        var arr = str.split(" ")  //拆分成数组以空格
        console.log(arr)
        var day = arr[0].split("/").join("-"); //arr[0]拿出来拆分数组再拼接成字符串
        var time=arr[1].split(":").join("/")
        var sum=day+" "+time;
        console.log(sum)
    </script>
</body>

</html>